package com.moon.service.impl;

import com.moon.service.ScheduledService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;

/**
 * @author ：xxx
 * @description：TODO
 * @date ：2024/04/25 22:38
 */
@Slf4j
@Service
public class ScheduledServiceImpl implements ScheduledService {


    @Override
//    @Scheduled(cron = "*/2 * * * * ?")
    @Scheduled(cron = "0 13 23 * * ?")
    @Async
    public void sayDogFuck() {
        try {
            Thread.sleep(10000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        log.info("嘿，狗娘养的....");
    }
}
